<?php
//include_once("public.php");
//print_r($_GET);die;//Array ( [id] => 148 )
include_once("../function.php");
if(!isset($_COOKIE["username"]))
{
	msg("尚未登录,请登录","./login.php");exit;
}

extract($_GET);//$id
$id=trim($id);
$sql="delete from ts_cart where pid='$id'";
//echo $sql;die;
$res=mysqli_query($link,$sql);
if($res)
{
	if(mysqli_affected_rows($link)==1)
	{
		header("location:./shopcar.php");
	}
}
?>